package leetcode.primary;

public class T240 {
    public boolean searchMatrix(int[][] matrix, int target){
        int upperBound_x=0,upperBound_y=0;
        int lowerBound_x=0,lowerBound_y=0;

        for (int i = 0; i < matrix.length; i++) {
            if (i<matrix[0].length){
                if (matrix[i][matrix[0].length-1]<target && matrix[matrix.length-1][i]<target){
                    lowerBound_x = i;
                    lowerBound_y = i;
                }
                if (matrix[i][i]>target){
                    upperBound_x = i;
                    upperBound_y = i;
                    break;
                }
                if (matrix[i][i]==target){
                    return true;
                }
            }else {
                break;
            }
        }
        return true;
    }

    public boolean BinarySearch(int[] nums,int left,int right){
        if (left>=right){
            return false;
        }
        int mid = left+right/2;
        return false;

    }
}
